package com.rainbowelephant.fun.fitness;

import java.io.Serializable;
import java.util.Date;

 class Profile implements Serializable{
                /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
				String name;
                String gender;
                
                int weight;
                int idealWeight;
                int heightFeet;
                int heightInches;
                
                int numTrophies;
                //Trophy data type
                
                int milesRan;
                int numOfRuns;
                
                double bmi;
                
                Date creationDate;
                Date lastWeightCheck;
                Date lastExercised;
                
                //newly added
                Trophies trophy=new Trophies();
                int startingWeight;
                int workoutsComplete;
                int totalSteps;
                int stepsToday;
                int cardioReps;
                int strengthReps;
                public void update(int distanceRan,int steps,int cardio,int strength )
                {
                	if(distanceRan!=0)
                		milesRan+=distanceRan;
                	if(steps!=0)
                	{
                		totalSteps+=steps;
                		if(lastExercised.equals(new Date()))
                		{
                			stepsToday+=steps;
                		}
                		else
                			stepsToday=steps;
                	}
                	if(cardio!=0)
                		cardioReps+=cardio;
                	if(strength!=0)
                		strengthReps+=strength;
                	lastExercised=new Date();
                	trophy.completion(this);
                }
                public void setStartWeight(int start)
                {
                	startingWeight=start;
                }
                public int getStartWeight()
                {
                	return startingWeight;
                }
                public void setWorkoutsComplete(int workouts)
                {
                	workoutsComplete=workouts;
                }
                public int getWorkoutsComplete()
                {
                	return workoutsComplete;
                }
                public void setTotalSteps(int steps)
                {
                	totalSteps=steps;
                }
                public int getTotalSteps()
                {
                	return totalSteps;
                }
                public void setStepsToday(int step)
                {
                	stepsToday=step;
                }
                public int getStepsToday()
                {
                	return stepsToday;
                }
                public void setName(String name){
                	this.name = name;
                }
                
                public String getName(){
                	return name;
                }
                
                public void setWeight(int newWeight) {
                        weight = newWeight;
                }
                
                public int getWeight() {
                        return weight;
                }

                public void setIdealWeight(int newWeight) {
                        idealWeight = newWeight;
                }
                
                public int getIdealWeight() {
                        return idealWeight;
                }

                public void setHeightFeet(int height) {
                        heightFeet = height;
                }
                
                public int getHeightFeet() {
                        return heightFeet;
                }

                public void setHeightInches(int height) {
                        heightInches = height;
                }
                
                public int getHeightInches() {
                        return heightInches;
                }
                
                void setNumTrophies(int num) {
                        numTrophies = num;
                }
                
                public int getNumTrophies() {
                        return numTrophies;
                }

                public void setMilesRan(int miles) {
                        milesRan = miles;
                }
                
                public int getMilesRan() {
                        return milesRan;
                }

                public void setNumOfRuns(int num) {
                        numOfRuns = num;
                }
                
                public int getNumOfRuns() {
                        return numOfRuns;
                }

                public void setBmi(int newBmi) {
                        bmi = newBmi;
                }
                
                public double getBmi() {
                        return bmi;
                }

                public void setCreationDate(Date theDate) {
                        creationDate = theDate;
                }
                
                public Date getCreationDate() {
                        return creationDate;
                }

                public void setLastWeightCheck(Date theDate) {
                        lastWeightCheck = theDate;
                }
                
                public Date getLastWeightCheck() {
                        return lastWeightCheck;
                }

                public void setLastExercised(Date theDate) {
                        lastExercised = theDate;
                }
                
                public Date getLastExercised() {
                        return lastExercised;
                }

				public void setGender(String gender) {
					this.gender = gender;	
				}
				
				public String getGender(){
					return gender;
				}
        }